﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Index.Master" AutoEventWireup="true" CodeBehind="employee.aspx.cs" Inherits="Web.group.employee" %>
<%@ Register Src="~/controls/message.ascx" TagName="message" TagPrefix="uc" %>
<%@ Register Src="~/Controls/GVPageManager.ascx" TagPrefix="ui" TagName="gv" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<form id="form1" runat="server">
        <div class="content-box">
            <!-- Start Content Box -->
            <div class="content-box-header">
                <h3>
                    成员管理</h3>
                <ul class="content-box-tabs">
                    <li><a id="a_tab1" href="#tab1" class="default-tab">成员管理</a></li>
                    <li><a id="a_tab2" href="employeeadd.aspx">添加成员</a></li>
                </ul>
                <div class="clear">
                </div>
            </div>
            <!-- End .content-box-header -->
            <div class="content-box-content">
                <div class="tab-content default-tab" id="tab1">
                    <div class="form">
                        <p>
                            <label style="width:80px; display:inline;">选择部门：</label>
                            <asp:DropDownList ID="ddl_department" runat="server" CssClass="small-input">
                            </asp:DropDownList>
                            <label style="width:100px; display:inline;">选择分公司：</label>
                            <asp:DropDownList ID="ddlBo" runat="server" CssClass="small-input">
                            </asp:DropDownList>
                            <asp:Button ID="btn_query" CssClass="button" runat="server" Text="查询" OnClick="btn_query_Click" />
                            <asp:Button ID="btn_export" CssClass="button" runat="server" Text="导出" OnClick="btn_export_Click" />
                            <asp:Button ID="btn_adduser" CssClass="button" runat="server" Text="开通个人服务模块" OnClick="btn_adduser_Click" />
                        </p>
                    </div>
                    <uc:message ID="u_message" Visible="false" runat="server" />
                    <asp:GridView ID="GridView1" AutoGenerateColumns="False" runat="server"
                    OnRowCommand="GridView1_RowCommand" DataKeyNames="employeeid,userid,departmentid,groupid,employeename,mobile">
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <input class="check-all" type="checkbox" />个人服务
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="cb_sel" runat="server" Checked='<%#Eval("userid").ToString() != ""?true:false %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="employeeid" HeaderText="员工编号" SortExpression="employeeid" />
                            <asp:BoundField DataField="employeename" HeaderText="姓名" SortExpression="employeename" />
                            <asp:BoundField DataField="age" HeaderText="年龄" SortExpression="age" />
                            <asp:TemplateField HeaderText="所属分公司">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# GetBoName(Commons.StrUtil.FormatValue(Eval("boid")))%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="departmentname" HeaderText="部门" SortExpression="departmentname" />
                            <asp:BoundField DataField="mobile" HeaderText="手机号" SortExpression="mobile" />
                            <asp:BoundField DataField="phone" HeaderText="固定电话" SortExpression="phone" />
                            <asp:BoundField DataField="email" HeaderText="邮箱" SortExpression="email" />
                            <asp:BoundField DataField="shortnum" HeaderText="短号码" SortExpression="shortnum" />
                            <asp:TemplateField HeaderText="管理">
                                <ItemTemplate>
                                    <a href='employeeedit.aspx?employeeid=<%#Eval("employeeid") %>' title="修改"><img src='<%#ResolveUrl("~/resources/images/icons/pencil.png") %>' alt="修改" /></a> 
                                    <asp:ImageButton ID="ImageButton1" ImageUrl="~/resources/images/icons/cross.png" AlternateText="删除" 
                                    CommandName="del" CommandArgument='<%#Eval("employeeid") %>'  runat="server"
                                    OnClientClick="return confirm('确认要进行删除吗')"/>
                                    <a href='pbright_member.aspx?righttype=1&memberid=<%#Eval("employeeid") %>' title="分配通讯录权限"><img src='<%#ResolveUrl("~/resources/images/icons/hammer_screwdriver.png") %>' alt="分配通讯录权限" /></a>
                                    <asp:ImageButton ID="ImageButton2" ImageUrl="~/resources/images/icons/exclamation.png" AlternateText="重置密码" CommandName="reset" CommandArgument='<%#Eval("employeeid") %>'
                                    OnClientClick="return confirm('确认要对用户将进行密码重置吗')" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <ui:gv ID="GV" runat="server" />

                    <div class="form">
                        <p>
                            <asp:FileUpload ID="fl_upload" runat="server" />
                            <asp:Button ID="btn_import" CssClass="button" runat="server" Text="导入" OnClick="btn_import_Click" />
                        </p>
                    </div>
                </div>
                <!-- End #tab1 -->
            </div>
            <!-- End .content-box-content -->
        </div>
    </form>
</asp:Content>
